<template>
	<view class="body__group">
		<template v-if="login">
			<template v-for="(test,index) in cats">
				<navigator :url="`/pages/dati_2/dati_2?isright={test.isright}`" :key="index">
					<globalCard>
						<view>{{test.cname}}</view>
						<view>{{test.qtitle}}</view>
						<image class="lianxi-btn__item" src="../../../static/lianxi.png"></image>
						<view class="tip_1_item">我要练习</view>
					</globalCard>
				</navigator>
			</template>
		</template>
		<view v-if="!login" class="tip__item">
			请先登录
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				login: getApp().globalData.userId,
				cats: [
					// {
					// 	isright: 1,
					// 	cname: '我的答题记录'
					// },
					{
						isright: 0,
						cname: '我的错题本'
					},
				]
			}
		},
	}
</script>


<style>
	.body__group {
		padding: 20px;
	}

	.lianxi-btn__item {
		width: 25vw;
		height: calc(25vw / (192 / 54));
		position: absolute;
		right: 20px;
		bottom: 20px;
	}

	.tip__item {
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		font-size: 12px;
		color: #aaa;
	}
</style>
